package baidu.com.matedemo;

import android.app.Activity;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;

import baidu.com.matedemo.base.BaseIntent;
import baidu.com.matedemo.dlp.AlertDemo;
import baidu.com.matedemo.dlp.AudioPlayerDemo;
import baidu.com.matedemo.dlp.AuthenticationDemo;
import baidu.com.matedemo.dlp.DeviceInfoDemo;
import baidu.com.matedemo.dlp.FunctionFragment;
import baidu.com.matedemo.dlp.LocationDemo;
import baidu.com.matedemo.dlp.ProtocolDemo;
import baidu.com.matedemo.dlp.RenderAlertDemo;
import baidu.com.matedemo.dlp.SpeakerDemo;
import baidu.com.matedemo.dlp.SpeechAndCardDemo;
import baidu.com.matedemo.dlp.TTSInfoDemo;
import baidu.com.matedemo.dlp.ThirdPartyDemo;
import baidu.com.matedemo.dlp.TvDemo;
import baidu.com.matedemo.network.LanDiscoveryFragment;


/**
 * Created by niufei01 on 2017/9/11.
 */

public class DemoIntent extends BaseIntent {

    public static void intentToLanDiscoveryFragment(Activity activity) {
        showFragmentAct(activity, "局域网设备发现", LanDiscoveryFragment.class);
    }

    public static void intentToSpeakerDemo(Activity activity, String title) {
        showFragmentAct(activity, title, SpeakerDemo.class);
    }

    public static void intentToAlertDemo(Activity activity, String title) {
        showFragmentAct(activity, title, AlertDemo.class);
    }

    public static void intentToRenderAlertDemo(Activity activity, String title) {
        showFragmentAct(activity, title, RenderAlertDemo.class);
    }

    public static void intentToAudioPlayerDemo(Activity activity, String title) {
        showFragmentAct(activity, title, AudioPlayerDemo.class);
    }


    public static void intentToDeviceInfoDemo(Activity activity, String title) {
        showFragmentAct(activity, title, DeviceInfoDemo.class);
    }

    public static void intentToLocationDemo(Activity activity, String title) {
        showFragmentAct(activity, title, LocationDemo.class);
    }

    public static void intentToProtocolDemo(Activity activity, String title) {
        showFragmentAct(activity, title, ProtocolDemo.class);
    }


    public static void intentToMainFragment(Activity activity) {
        showFragmentAct(activity, "功能列表", FunctionFragment.class);
    }

    public static void intentToAuthenticationDemo(Activity activity, String title) {
        showFragmentAct(activity, title, AuthenticationDemo.class);

    }

    public static void intentToTvDemo(Activity activity, String title) {
        showFragmentAct(activity, title, TvDemo.class);
    }


    public static void intentToSpeechCardDemo(FragmentActivity activity, String title) {
        showFragmentAct(activity, title, SpeechAndCardDemo.class);
    }

    public static void intentToTTSInfoDemo(Activity activity, String title) {
        showFragmentAct(activity, title, TTSInfoDemo.class);
    }

    public static void intentToSinglePageFragment(Activity activity, String title) {
        showFragmentAct(activity, title, SinglePageFragment.class);
    }

    public static void intentToThirdPartDemo(Activity activity, String title) {
        showFragmentAct(activity, title, ThirdPartyDemo.class);
    }

    public static void intentToDuerSDKAPIIntro(Activity activity, String title) {
        showFragmentAct(activity, title, DuerSDKAPIIntro.class);
    }

    public static void showFragmentAct(Activity activity, String title, Class<?> cls) {
        Bundle bundle = new Bundle();
        bundle.putBoolean("extra-state-notify", true);
        showFragmentAct(activity, title, cls, bundle);
    }

}
